<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

    </style>
</head>

<body>
    <div style="position: fixed; top: 0; right: 0; ">
        <a href="#div1">滚动到Div1</a>
        <a href="#div2">滚动到a标签</a>
    </div>

    <div style="height:500px"></div>
    <div id="div1" style="height:500px">div1的内容</div>
    <a name="div2" style="height:500px; display: block">a的内容</a>
</body>

</html>